package com.ruoyi.project.system.depart.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.depart.mapper.DepartMapper;
import com.ruoyi.project.system.depart.domain.Depart;
import com.ruoyi.project.system.depart.service.IDepartService;
import com.ruoyi.common.utils.text.Convert;

/**
 * exampleService业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-27
 */
@Service
public class DepartServiceImpl implements IDepartService 
{
    @Autowired
    private DepartMapper departMapper;

    /**
     * 查询example
     * 
     * @param id example主键
     * @return example
     */
    @Override
    public Depart selectDepartById(Long id)
    {
        return departMapper.selectDepartById(id);
    }

    /**
     * 查询example列表
     * 
     * @param depart example
     * @return example
     */
    @Override
    public List<Depart> selectDepartList(Depart depart)
    {
        return departMapper.selectDepartList(depart);
    }

    /**
     * 新增example
     * 
     * @param depart example
     * @return 结果
     */
    @Override
    public int insertDepart(Depart depart)
    {
        return departMapper.insertDepart(depart);
    }

    /**
     * 修改example
     * 
     * @param depart example
     * @return 结果
     */
    @Override
    public int updateDepart(Depart depart)
    {
        return departMapper.updateDepart(depart);
    }

    /**
     * 批量删除example
     * 
     * @param ids 需要删除的example主键
     * @return 结果
     */
    @Override
    public int deleteDepartByIds(String ids)
    {
        return departMapper.deleteDepartByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除example信息
     * 
     * @param id example主键
     * @return 结果
     */
    @Override
    public int deleteDepartById(Long id)
    {
        return departMapper.deleteDepartById(id);
    }
}
